import request from '@/utils/request'

// 查询参数列表
export function list(query) {
  return request({
    url: '/system/dem/list',
    method: 'get',
    params: query
  })
}

// 查询需求数量
export function listNum(query) {
  return request({
    url: '/system/dem/listNum',
    method: 'get',
    params: query
  })
}
// 新增需求
export function dem(data) {
  return request({
    url: '/system/dem',
    method: 'post',
    data
  })
}

// 删除需求
export function deleteDem(query) {
  return request({
    url: '/system/dem/' + query,
    method: 'delete'
  })
}

// 查询动态
export function Dynamic(query) {
  return request({
    url: '/system/dyn/pm',
    method: 'get',
    params: query
  })
}

// 查询动态数量
export function DynamicNum(query) {
  return request({
    url: '/system/dyn/listNum/' + query ,
    method: 'get'
  })
}

// 新增评论
export function dyn(data) {
  return request({
    url: '/system/dyn',
    method: 'post',
    data
  })
}

// 修改需求
export function emitList(data) {
  return request({
    url: '/system/dem',
    method: 'put',
    data
  })
}
